import java.util.Scanner;

//学员信息测试
public class StudentTest {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        StudentMsg msg = new StudentMsg();
        //添加学员
        for (int i=1;i<=5;i++){
            System.out.print("\n请输入学员姓名：");
            String name = input.next();
            msg.addName(name);
        }
        //显示学员
        msg.showMsg();

        //查找学员
        System.out.print("请输入查找的开始位置：");
        int start = input.nextInt();
        System.out.print("请输入查找的结束位置：");
        int end = input.nextInt();
        System.out.print("请输入查找的学员姓名：");
        String name = input.next();
        boolean flag = msg.searchName(start,end,name);
        System.out.println("**********查找结果*************");
        if (flag){
            System.out.print("找到了");
        }else {
            System.out.print("没找到");
        }
    }
}
